#include <stdio.h>

int main(int argc, char *argv[])
{

    int a = 0, n = 0, sum = 0;
    scanf("%d %d", &a, &n);
    int temp = a;
    for (size_t i = 0; i < n; i++)
    {
        sum += a;
        a = a * 10 + temp;
    }

    printf("%d", sum);

    return 0;
}